﻿using CleanArchitecture.Infrastructure.Interfaces.SystemLog;

namespace CleanArchitecture.Infrastructure.Services.SystemTasks
{
    /// <summary>
    /// Represents a task to clear [Log] table
    /// </summary>
    public partial class ClearLogTask : IScheduleTask
    {
        #region Fields

        private readonly ISystemLogService _logger;

        #endregion

        #region Ctor

        public ClearLogTask(ISystemLogService logger)
        {
            _logger = logger;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Executes a task
        /// </summary>
        public virtual bool Execute()
        {
            _logger.ClearLog();
            return true;
        }

        #endregion
    }
}
